package com.quartet.modules.customer.dto;

import com.quartet.api.SuperPageBo;
import com.quartet.validation.AddValidation;
import com.quartet.validation.UpdateValidation;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 客户信息入参DTO
 *
 * @author makejava
 * @since 2021-05-04 16:25:15
 */
@Data
public class TCustomerInfoAddRequestDto extends SuperPageBo {

    /**
     * @Fields serialVersionUID
     *
     */
    private static final long serialVersionUID = -4635091599540345302L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    private Integer id;

    /**
     * 客户编码
     */
    @ApiModelProperty(value = "客户编码")
    private String customerCode;

    /**
     * 客户名称
     */
    @ApiModelProperty(value = "客户名称")
    @NotBlank(message = "BMKPT002", groups = {AddValidation.class})
    private String customerName;

    /**
     * 创建者id
     */
    @ApiModelProperty(value = "创建者id")
    private String createUserId;

    /**
     * 创建者名称
     */
    @ApiModelProperty(value = "创建者名称")
    private String createUsername;

    /**
     * 联系人名称
     */
    @ApiModelProperty(value = "联系人名称")
    private String contacts;

    /**
     * 联系人电话
     */
    @ApiModelProperty(value = "联系人电话")
    @Pattern(regexp = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$",message = "BMKPT005",groups = {AddValidation.class, UpdateValidation.class})
    private String contactsPhone;

    /**
     * 客户地址
     */
    @ApiModelProperty(value = "客户地址")
    private String customerAddress;

    /**
     * 预留字段
     */
    @ApiModelProperty(value = "预留字段")
    private String status;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remarks;
}
